package com.cpi.cornpp.common.files.dto;
/**
 * Corn Forecast Data Access Object
 * @author Edgar Joao
 * @see SAPComponentDTO
 */
public class SAPComponentCornForecastDTO implements SAPComponentDTO{
	/**
	 * 
	 */
	private static final long serialVersionUID = -6320820148296301729L;
	private String customer;
	private String material;
	private int fiscalYear;
	private int period;
	private double contracted;
	private double nonContracted;
	/*
	 * (non-Javadoc)
	 * @see java.lang.Object#equals(java.lang.Object)
	 */
	public boolean equals(Object object) {
		boolean equal = false;
		SAPComponentCornForecastDTO sapComponentCornForecastDTO = null;
		if( this == object ){
			equal = true;
		}else{
			if( this instanceof SAPComponentCornForecastDTO ){
				sapComponentCornForecastDTO = (SAPComponentCornForecastDTO)object;
				if( this.hashCode() == sapComponentCornForecastDTO.hashCode() ){
					equal = true;
				}
			}
		}
		return equal;
	}
	/*
	 * (non-Javadoc)
	 * @see java.lang.Object#hashCode()
	 */
	public int hashCode() {
		int hash = 0;
		hash =  ( this.customer != null ? this.customer.hashCode() : 0 );
		hash +=  ( this.material != null ? this.material.hashCode() : 0 );
		hash += new Integer(this.fiscalYear).hashCode();
		hash += new Integer(this.period).hashCode();
		hash += new Double(this.contracted).hashCode();
		hash += new Double(this.nonContracted).hashCode();	
		return hash;
	}
	/*
	 * (non-Javadoc)
	 * @see java.lang.Object#toString()
	 */
	public String toString() {
		StringBuffer toStringValue = null;
		toStringValue = new StringBuffer(0);
		toStringValue.append(getClass().getName());
		toStringValue.append(STRING_COLON);
		toStringValue.append(this.customer);
		toStringValue.append(STRING_COMMA);
		toStringValue.append(this.material);
		toStringValue.append(STRING_COMMA);
		toStringValue.append(this.fiscalYear);
		toStringValue.append(STRING_COMMA);
		toStringValue.append(this.period);
		toStringValue.append(STRING_COMMA);
		toStringValue.append(this.contracted);
		toStringValue.append(STRING_COMMA);
		toStringValue.append(this.nonContracted);		
		toStringValue.append(STRING_COLON);
		return toStringValue.toString();		
	}	
	public String getCustomer() {
		return customer;
	}
	public void setCustomer(String argCustomer) {
		customer = argCustomer;
	}
	public String getMaterial() {
		return material;
	}
	public void setMaterial(String argMaterial) {
		material = argMaterial;
	}
	public int getFiscalYear() {
		return fiscalYear;
	}
	public void setFiscalYear(int argFiscalYear) {
		fiscalYear = argFiscalYear;
	}
	public int getPeriod() {
		return period;
	}
	public void setPeriod(int argPeriod) {
		period = argPeriod;
	}
	public double getContracted() {
		return contracted;
	}
	public void setContracted(double argContracted) {
		contracted = argContracted;
	}
	public double getNonContracted() {
		return nonContracted;
	}
	public void setNonContracted(double argNonContracted) {
		nonContracted = argNonContracted;
	}
		
}
